package com.th.bean;

import org.apache.ibatis.annotations.Many;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.io.Serializable;

public class Employye implements Serializable {
    private Integer id;
    @Max(value = 100,message = "年龄不能超过100岁")
    @Min(value = 1,message = "年龄不能小于1岁")
    private Integer age;
    @Max(value = 1,message = "性别只能为1和0")
    @Min(value = 0,message = "性别只能为1和0")
    private Integer sex;
    @Length(min = 5,max = 20,message = "名字长度不合法，1-20位")
    private String name;
    private String address;

    public Employye(Integer id, Integer age, Integer sex, String name, String address) {
        this.id = id;
        this.age = age;
        this.sex = sex;
        this.name = name;
        this.address = address;
    }

    public Employye() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
